package br.com.peperoncino.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="TBLCLITEL")
@SuppressWarnings("serial")
public class ClienteTelefone implements Serializable{
	
	@Id
	@Column(name="CODCLITEL")
	private Integer id;
	
	@Enumerated(EnumType.STRING)
	@Column(name="TIPTEL", nullable = false)
	private TipoTelefone tipoTelefone;
	
	@Column(name="NUMERO", nullable = false)
	private Integer numeroTelefone;
	
	@JoinColumn(name="CODCLI")
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	private Cliente cliente;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public TipoTelefone getTipoTelefone() {
		return tipoTelefone;
	}

	public void setTipoTelefone(TipoTelefone tipoTelefone) {
		this.tipoTelefone = tipoTelefone;
	}


	public Integer getNumeroTelefone() {
		return numeroTelefone;
	}

	public void setNumeroTelefone(Integer numeroTelefone) {
		this.numeroTelefone = numeroTelefone;
	}

	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}
}